package com.windfone.service.impl;

import java.util.List;

import com.windfone.dao.NewsDao;
import com.windfone.model.News;
import com.windfone.model.NewsType;
import com.windfone.service.NewsService;

public class NewsServiceImpl implements NewsService {

	private NewsDao newsDao;
	public NewsDao getNewsDao() {
		return newsDao;
	}

	public void setNewsDao(NewsDao newsDao) {
		this.newsDao = newsDao;
	}

	public int deleteNews(int keyValue) {
		return newsDao.deleteNews(keyValue);
	}

	public int getAllRecorderNumber() {
		return newsDao.getAllRecorderNumber();
	}

	public int updateNews(News bean) {
		return newsDao.updateNews(bean);
	}

	public int insertNews(News bean) {
		return newsDao.insertNews(bean);
	}

	public List<News> getNewsById(int keyValue) {
		return newsDao.getNewsById(keyValue);
	}

	public List<News> getAllNews(int beginRecord) {
		return newsDao.getAllNews(beginRecord);
	}

	public int deleteNewsType(int keyValue) {
		return newsDao.deleteNewsType(keyValue);
	}

	public int updateNewsType(NewsType bean) {
		return newsDao.updateNewsType(bean);
	}

	public int insertNewsType(NewsType bean) {
		return newsDao.insertNewsType(bean);
	}

	public List<NewsType> getAllNewsType() {
		return newsDao.getAllNewsType();
	}

	public List<NewsType> getNewsTypeById(int keyValue) {
		return newsDao.getNewsTypeById(keyValue);
	}

	public int getAllNewsTypeRecorderNumber() {
		// TODO Auto-generated method stub
		return newsDao.getAllNewsTypeRecorderNumber();
	}

	public List<News> getNewsByNewtypeId(int keyValue) {
		return newsDao.getNewsByNewtypeId(keyValue);
	}

}
